package com.example.servicedemo1.demos.web;

import com.example.servicedemo1.demos.util.NotifyDataDecrypter;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;


@RestController
public class EventDataController {

    @RequestMapping("/feishu/event")
    private static JSONObject eventData(@RequestBody String s) {
        JSONObject jsonResponse = JSON.parseObject(s);
        System.out.println(jsonResponse);
//        JSONObject jsonObject = JSON.parseObject(NotifyDataDecrypter.decrypt("XwkFttsnRxMTXl0f93SwVcYvpVzf1jrm", jsonResponse.get("encrypt").toString()));
        return jsonResponse;
    }

}
